<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>首页</title>
    <link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css">
    <script src="https://cdn.staticfile.org/jquery/2.1.1/jquery.min.js"></script>
    <script src="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<h1>首页</h1>.

<button type="button" class="btn" style="color: aliceblue"> <a th:href="@{/add}" >新增信息</a>
</button>
<button type="button" class="btn" style="color: aliceblue"> <a th:href="@{/quit}" >退出</a>
</button>
<form class="form-horizontal" role="form"   method="post"  th:action="@{/search}"  style="margin-left: 150px;float: left;">

    <div class="form-group">
        <div class="col-sm-8">
            <input type="text" class="form-control" id="firstname"
                   name="content"
                   placeholder="请输入标题或内容">
        </div>
        <button type="submit" class="btn btn-default" >搜索</button>

    </div>

</form>
​

<table class="table" style="margin-left: 100px">
    <thead>
    <tr>
        <th>id</th>
        <th>内容</th>
        <th>标题</th>
        <th>操作</th>
    </tr>
    </thead>
    <tbody>
    <tr th:each="emp:${messages}">
        <td th:text="${emp.getId()}"></td>
        <td th:text="${emp.getContent()}"></td>
        <td th:text="${emp.getTitle()}"></td>
        <td > <a th:href="@{/update/}+${emp.getId()}">更改</a> &nbsp; | &nbsp;  <a th:href="@{/delete/}+${emp.getId()}">删除</a></td>
    </tr>

    </tbody>
</table>

</body>
</html>